/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.integral.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 积分优惠券订单表
 * @Author: xiaoq
 * @Date : 2020/1/9 8:54
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_integral_coupon_order")
@ApiModel(value = "IntegralCouponOrder对象", description = "积分优惠券订单表")
public class IntegralCouponOrder<T extends Model<?>> extends Model<T>  implements Serializable {

	@ApiModelProperty(value = "积分优惠券订单id")
	@TableId(value = "id", type = IdType.ID_WORKER)
	private Long id;

	@ApiModelProperty(value = "满足条件金额")
	@TableField("condition_amount")
	private BigDecimal conditionAmount;


	@ApiModelProperty(value = "优惠金额")
	@TableField("discount_amount")
	private BigDecimal discountAmount;

	@ApiModelProperty(value = "有效类型  0-固定时间 1-领劵立即生效")
    @TableField("effective_type")
	private Integer effectiveType;

    @ApiModelProperty(value = "有效天数")
    @TableField("effective_days")
	private  Integer effectiveDays;

	@ApiModelProperty(value = "优惠抵扣")
	@TableField("discount")
	private BigDecimal discount;


	@ApiModelProperty(value = "优惠券类型")
	@TableField("coupon_type")
	private Integer couponType;

	@ApiModelProperty(value = "实付积分值")
	@TableField("real_pay_integral")
	private BigDecimal realPayIntegral;


	@ApiModelProperty(value = "用户id")
	@TableField("user_id")
	private String userId;


	@ApiModelProperty(value = "用户微信名")
	@TableField("wxuser_name")
	private String wxuserName;


	@ApiModelProperty(value = "优惠劵有效期")
	@TableField("coupon_validity")
	private String couponValidity;

	@ApiModelProperty(value = "发货时间")
	@TableField("send_time")
	private LocalDateTime sendTime;

	@ApiModelProperty(value = "商家备注")
	@TableField("back_remark")
	private String backRemark;

	@ApiModelProperty(value = "商铺Id")
	@TableField("shop_id")
	private String shopId;


	@ApiModelProperty("租户ID")
	private String tenantId;


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;


	@TableLogic
	@ApiModelProperty("删除状态：0->未删除；1->已删除")
	@TableField(value = "is_deleted", fill = FieldFill.INSERT)
	private Boolean deleted;

}
